Integrand size = 21, antiderivative size = 122 \[ \int (c+d x) (a+i a \sinh (e+f x))^2 \, dx=\frac {1}{2} a^2 c x+\frac {1}{4} a^2 d x^2+\frac {a^2 (c+d x)^2}{2 d}+\frac {2 i a^2 (c+d x) \cosh (e+f x)}{f}-\frac {2 i a^2 d \sinh (e+f x)}{f^2}-\frac {a^2 (c+d x) \cosh (e+f x) \sinh (e+f x)}{2 f}+\frac {a^2 d \sinh ^2(e+f x)}{4 f^2} \]
1/2*a^2*c*x+1/4*a^2*d*x^2+1/2*a^2*(d*x+c)^2/d+2*I*a^2*(d*x+c)*cosh(f*x+e)/ f-2*I*a^2*d*sinh(f*x+e)/f^2-1/2*a^2*(d*x+c)*cosh(f*x+e)*sinh(f*x+e)/f+1/4* a^2*d*sinh(f*x+e)^2/f^2
Time = 12.52 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.70 \[ \int (c+d x) (a+i a \sinh (e+f x))^2 \, dx=\frac {a^2 (16 i f (c+d x) \cosh (e+f x)+d \cosh (2 (e+f x))-2 (3 (e+f x) (d e-2 c f-d f x)+8 i d \sinh (e+f x)+f (c+d x) \sinh (2 (e+f x))))}{8 f^2} \]
(a^2*((16*I)*f*(c + d*x)*Cosh[e + f*x] + d*Cosh[2*(e + f*x)] - 2*(3*(e + f *x)*(d*e - 2*c*f - d*f*x) + (8*I)*d*Sinh[e + f*x] + f*(c + d*x)*Sinh[2*(e + f*x)])))/(8*f^2)
Time = 0.31 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.84, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3042, 3798, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (c+d x) (a+i a \sinh (e+f x))^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (c+d x) (a+a \sin (i e+i f x))^2dx\) |
\(\Big \downarrow \) 3798 |
\(\displaystyle \int \left (-\left (a^2 (c+d x) \sinh ^2(e+f x)\right )+2 i a^2 (c+d x) \sinh (e+f x)+a^2 (c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {2 i a^2 (c+d x) \cosh (e+f x)}{f}-\frac {a^2 (c+d x) \sinh (e+f x) \cosh (e+f x)}{2 f}+\frac {3 a^2 (c+d x)^2}{4 d}+\frac {a^2 d \sinh ^2(e+f x)}{4 f^2}-\frac {2 i a^2 d \sinh (e+f x)}{f^2}\) |
(3*a^2*(c + d*x)^2)/(4*d) + ((2*I)*a^2*(c + d*x)*Cosh[e + f*x])/f - ((2*I) *a^2*d*Sinh[e + f*x])/f^2 - (a^2*(c + d*x)*Cosh[e + f*x]*Sinh[e + f*x])/(2 *f) + (a^2*d*Sinh[e + f*x]^2)/(4*f^2)
3.2.4.3.1 Defintions of rubi rules used
Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.) , x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, (a + b*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 0] && (EqQ[n, 1] || IGtQ[ m, 0] || NeQ[a^2 - b^2, 0])
Time = 0.81 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.69
method | result | size |
parallelrisch | \(\frac {2 \left (-\frac {\left (d x +c \right ) f \sinh \left (2 f x +2 e \right )}{8}+\frac {d \cosh \left (2 f x +2 e \right )}{16}+i f \left (d x +c \right ) \cosh \left (f x +e \right )-i \sinh \left (f x +e \right ) d +\frac {3 x \left (\frac {d x}{2}+c \right ) f^{2}}{4}+i c f -\frac {d}{16}\right ) a^{2}}{f^{2}}\) | \(84\) |
risch | \(\frac {3 a^{2} d \,x^{2}}{4}+\frac {3 a^{2} c x}{2}-\frac {a^{2} \left (2 d f x +2 c f -d \right ) {\mathrm e}^{2 f x +2 e}}{16 f^{2}}+\frac {i a^{2} \left (d f x +c f -d \right ) {\mathrm e}^{f x +e}}{f^{2}}+\frac {i a^{2} \left (d f x +c f +d \right ) {\mathrm e}^{-f x -e}}{f^{2}}+\frac {a^{2} \left (2 d f x +2 c f +d \right ) {\mathrm e}^{-2 f x -2 e}}{16 f^{2}}\) | \(129\) |
parts | \(a^{2} \left (\frac {1}{2} d \,x^{2}+c x \right )+\frac {2 i a^{2} \left (\frac {d \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f}-\frac {d e \cosh \left (f x +e \right )}{f}+c \cosh \left (f x +e \right )\right )}{f}-\frac {a^{2} \left (\frac {d \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )}{f}-\frac {d e \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f}+c \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )\right )}{f}\) | \(179\) |
derivativedivides | \(\frac {\frac {d \,a^{2} \left (f x +e \right )^{2}}{2 f}+\frac {2 i d \,a^{2} \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f}-\frac {d \,a^{2} \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )}{f}-\frac {d e \,a^{2} \left (f x +e \right )}{f}-\frac {2 i d e \,a^{2} \cosh \left (f x +e \right )}{f}+\frac {d e \,a^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f}+a^{2} c \left (f x +e \right )+2 i c \,a^{2} \cosh \left (f x +e \right )-a^{2} c \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f}\) | \(215\) |
default | \(\frac {\frac {d \,a^{2} \left (f x +e \right )^{2}}{2 f}+\frac {2 i d \,a^{2} \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f}-\frac {d \,a^{2} \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )}{f}-\frac {d e \,a^{2} \left (f x +e \right )}{f}-\frac {2 i d e \,a^{2} \cosh \left (f x +e \right )}{f}+\frac {d e \,a^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f}+a^{2} c \left (f x +e \right )+2 i c \,a^{2} \cosh \left (f x +e \right )-a^{2} c \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f}\) | \(215\) |
2*(-1/8*(d*x+c)*f*sinh(2*f*x+2*e)+1/16*d*cosh(2*f*x+2*e)+I*f*(d*x+c)*cosh( f*x+e)-I*sinh(f*x+e)*d+3/4*x*(1/2*d*x+c)*f^2+I*c*f-1/16*d)*a^2/f^2
Time = 0.25 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.34 \[ \int (c+d x) (a+i a \sinh (e+f x))^2 \, dx=\frac {{\left (2 \, a^{2} d f x + 2 \, a^{2} c f + a^{2} d - {\left (2 \, a^{2} d f x + 2 \, a^{2} c f - a^{2} d\right )} e^{\left (4 \, f x + 4 \, e\right )} - 16 \, {\left (-i \, a^{2} d f x - i \, a^{2} c f + i \, a^{2} d\right )} e^{\left (3 \, f x + 3 \, e\right )} + 12 \, {\left (a^{2} d f^{2} x^{2} + 2 \, a^{2} c f^{2} x\right )} e^{\left (2 \, f x + 2 \, e\right )} - 16 \, {\left (-i \, a^{2} d f x - i \, a^{2} c f - i \, a^{2} d\right )} e^{\left (f x + e\right )}\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{16 \, f^{2}} \]
1/16*(2*a^2*d*f*x + 2*a^2*c*f + a^2*d - (2*a^2*d*f*x + 2*a^2*c*f - a^2*d)* e^(4*f*x + 4*e) - 16*(-I*a^2*d*f*x - I*a^2*c*f + I*a^2*d)*e^(3*f*x + 3*e) + 12*(a^2*d*f^2*x^2 + 2*a^2*c*f^2*x)*e^(2*f*x + 2*e) - 16*(-I*a^2*d*f*x - I*a^2*c*f - I*a^2*d)*e^(f*x + e))*e^(-2*f*x - 2*e)/f^2
Time = 0.32 (sec) , antiderivative size = 357, normalized size of antiderivative = 2.93 \[ \int (c+d x) (a+i a \sinh (e+f x))^2 \, dx=\frac {3 a^{2} c x}{2} + \frac {3 a^{2} d x^{2}}{4} + \begin {cases} \frac {\left (\left (32 a^{2} c f^{7} e^{e} + 32 a^{2} d f^{7} x e^{e} + 16 a^{2} d f^{6} e^{e}\right ) e^{- 2 f x} + \left (- 32 a^{2} c f^{7} e^{5 e} - 32 a^{2} d f^{7} x e^{5 e} + 16 a^{2} d f^{6} e^{5 e}\right ) e^{2 f x} + \left (256 i a^{2} c f^{7} e^{2 e} + 256 i a^{2} d f^{7} x e^{2 e} + 256 i a^{2} d f^{6} e^{2 e}\right ) e^{- f x} + \left (256 i a^{2} c f^{7} e^{4 e} + 256 i a^{2} d f^{7} x e^{4 e} - 256 i a^{2} d f^{6} e^{4 e}\right ) e^{f x}\right ) e^{- 3 e}}{256 f^{8}} & \text {for}\: f^{8} e^{3 e} \neq 0 \\\frac {x^{2} \left (- a^{2} d e^{4 e} + 4 i a^{2} d e^{3 e} - 4 i a^{2} d e^{e} - a^{2} d\right ) e^{- 2 e}}{8} + \frac {x \left (- a^{2} c e^{4 e} + 4 i a^{2} c e^{3 e} - 4 i a^{2} c e^{e} - a^{2} c\right ) e^{- 2 e}}{4} & \text {otherwise} \end {cases} \]
3*a**2*c*x/2 + 3*a**2*d*x**2/4 + Piecewise((((32*a**2*c*f**7*exp(e) + 32*a **2*d*f**7*x*exp(e) + 16*a**2*d*f**6*exp(e))*exp(-2*f*x) + (-32*a**2*c*f** 7*exp(5*e) - 32*a**2*d*f**7*x*exp(5*e) + 16*a**2*d*f**6*exp(5*e))*exp(2*f* x) + (256*I*a**2*c*f**7*exp(2*e) + 256*I*a**2*d*f**7*x*exp(2*e) + 256*I*a* *2*d*f**6*exp(2*e))*exp(-f*x) + (256*I*a**2*c*f**7*exp(4*e) + 256*I*a**2*d *f**7*x*exp(4*e) - 256*I*a**2*d*f**6*exp(4*e))*exp(f*x))*exp(-3*e)/(256*f* *8), Ne(f**8*exp(3*e), 0)), (x**2*(-a**2*d*exp(4*e) + 4*I*a**2*d*exp(3*e) - 4*I*a**2*d*exp(e) - a**2*d)*exp(-2*e)/8 + x*(-a**2*c*exp(4*e) + 4*I*a**2 *c*exp(3*e) - 4*I*a**2*c*exp(e) - a**2*c)*exp(-2*e)/4, True))
Time = 0.20 (sec) , antiderivative size = 167, normalized size of antiderivative = 1.37 \[ \int (c+d x) (a+i a \sinh (e+f x))^2 \, dx=\frac {1}{2} \, a^{2} d x^{2} + \frac {1}{16} \, {\left (4 \, x^{2} - \frac {{\left (2 \, f x e^{\left (2 \, e\right )} - e^{\left (2 \, e\right )}\right )} e^{\left (2 \, f x\right )}}{f^{2}} + \frac {{\left (2 \, f x + 1\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{f^{2}}\right )} a^{2} d + \frac {1}{8} \, a^{2} c {\left (4 \, x - \frac {e^{\left (2 \, f x + 2 \, e\right )}}{f} + \frac {e^{\left (-2 \, f x - 2 \, e\right )}}{f}\right )} + a^{2} c x + i \, a^{2} d {\left (\frac {{\left (f x e^{e} - e^{e}\right )} e^{\left (f x\right )}}{f^{2}} + \frac {{\left (f x + 1\right )} e^{\left (-f x - e\right )}}{f^{2}}\right )} + \frac {2 i \, a^{2} c \cosh \left (f x + e\right )}{f} \]
1/2*a^2*d*x^2 + 1/16*(4*x^2 - (2*f*x*e^(2*e) - e^(2*e))*e^(2*f*x)/f^2 + (2 *f*x + 1)*e^(-2*f*x - 2*e)/f^2)*a^2*d + 1/8*a^2*c*(4*x - e^(2*f*x + 2*e)/f + e^(-2*f*x - 2*e)/f) + a^2*c*x + I*a^2*d*((f*x*e^e - e^e)*e^(f*x)/f^2 + (f*x + 1)*e^(-f*x - e)/f^2) + 2*I*a^2*c*cosh(f*x + e)/f
Time = 0.27 (sec) , antiderivative size = 155, normalized size of antiderivative = 1.27 \[ \int (c+d x) (a+i a \sinh (e+f x))^2 \, dx=\frac {3}{4} \, a^{2} d x^{2} + \frac {3}{2} \, a^{2} c x - \frac {{\left (2 \, a^{2} d f x + 2 \, a^{2} c f - a^{2} d\right )} e^{\left (2 \, f x + 2 \, e\right )}}{16 \, f^{2}} + \frac {{\left (i \, a^{2} d f x + i \, a^{2} c f - i \, a^{2} d\right )} e^{\left (f x + e\right )}}{f^{2}} + \frac {{\left (i \, a^{2} d f x + i \, a^{2} c f + i \, a^{2} d\right )} e^{\left (-f x - e\right )}}{f^{2}} + \frac {{\left (2 \, a^{2} d f x + 2 \, a^{2} c f + a^{2} d\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{16 \, f^{2}} \]
3/4*a^2*d*x^2 + 3/2*a^2*c*x - 1/16*(2*a^2*d*f*x + 2*a^2*c*f - a^2*d)*e^(2* f*x + 2*e)/f^2 + (I*a^2*d*f*x + I*a^2*c*f - I*a^2*d)*e^(f*x + e)/f^2 + (I* a^2*d*f*x + I*a^2*c*f + I*a^2*d)*e^(-f*x - e)/f^2 + 1/16*(2*a^2*d*f*x + 2* a^2*c*f + a^2*d)*e^(-2*f*x - 2*e)/f^2
Time = 0.42 (sec) , antiderivative size = 104, normalized size of antiderivative = 0.85 \[ \int (c+d x) (a+i a \sinh (e+f x))^2 \, dx=\frac {a^2\,\left (6\,d\,x^2+12\,c\,x\right )}{8}-\frac {\frac {a^2\,\left (-d\,\mathrm {cosh}\left (2\,e+2\,f\,x\right )+d\,\mathrm {sinh}\left (e+f\,x\right )\,16{}\mathrm {i}\right )}{8}-\frac {a^2\,f\,\left (c\,\mathrm {cosh}\left (e+f\,x\right )\,16{}\mathrm {i}-2\,c\,\mathrm {sinh}\left (2\,e+2\,f\,x\right )-2\,d\,x\,\mathrm {sinh}\left (2\,e+2\,f\,x\right )+d\,x\,\mathrm {cosh}\left (e+f\,x\right )\,16{}\mathrm {i}\right )}{8}}{f^2} \]